package com.zbkj.front.controller;


import com.zbkj.common.page.CommonPage;
import com.zbkj.common.request.PageParamRequest;
import com.zbkj.common.request.standard.QueryStandByTypeRequest;
import com.zbkj.common.response.CommonResult;
import com.zbkj.common.response.project.ClientProjectInfoResponse;
import com.zbkj.common.response.standard.StandInfoResponse;
import com.zbkj.common.response.standard.StandardListResponse;
import com.zbkj.front.service.PeEnquiryHandleService;
import com.zbkj.front.service.impl.PeStandardHandleServiceImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 标准 前端控制器
 * </p>
 *
 * @author 
 * @since 2025-08-03
 */
@RestController
@RequestMapping("api/front/peStandardController")
public class PeStandardController {

    @Autowired
    private PeStandardHandleServiceImpl peStandardHandleService;

    @ApiOperation(value="标准列表")
    @PostMapping("/standList")
    public CommonResult<CommonPage<StandardListResponse>> standList(@RequestBody QueryStandByTypeRequest pageParamRequest) {
        return CommonResult.success(CommonPage.restPage(peStandardHandleService.standList(pageParamRequest)));
    }

    @ApiOperation(value="标准详情")
    @GetMapping(value = "/standList/{standId}")
    public CommonResult<List<StandInfoResponse>> standInfo(@PathVariable("standId") Long standId) {
        return CommonResult.success(peStandardHandleService.standInfo(standId));
    }
}
